package com.kummuna.bl;

import java.io.InputStream;
import java.io.InputStreamReader;

import java.util.ArrayList;
import java.util.List;
 
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONObject;
 
import android.content.Context;


public class UserFunctions {
	
	private JSONParser jsonParser;
	private static String loginURL="http://202.21.149.53/Gecko/api/UserInfo";

	
	//constructor
	public UserFunctions()
	{
		jsonParser=new JSONParser();
	}
	
	public JSONObject loginUser(String name, String username, String image)
	{
		List<NameValuePair> params=new ArrayList<NameValuePair>();
		try{
	    params.add(new BasicNameValuePair("Name", name));
		params.add(new BasicNameValuePair("Username", username));
		params.add(new BasicNameValuePair("Image", image));
		
		}
		catch(Exception ex)
		{
			ex.printStackTrace();
		}
		JSONObject json=jsonParser.getJSONFromUrl(loginURL, params);
	
		return json;
	}
	
	
	

}
